1. Field of the Invention
The present invention relates generally to a color analysis and evaluation method based upon a transformation of three primary color measurements from an x,y,z cartesian coordinate system to a spherical coordinate system.
More particularly, the subject invention pertains to a color analysis and evaluation method based upon a transformation of three primary color measurements from an x,y,z cartesian coordinate system to a rotated spherical coordinate system in which a target color vector in the cartesian coordinate system defines the primary z axis in the rotated spherical coordinate system. In one disclosed embodiment, a computerized color analysis method uses a color camera to take a picture of a finished baked product, and rates its overall appearance by measuring specific features and comparing them to standard measurements for the product.
2. Discussion of the Prior Art
Color monitors, video cameras and computer graphics often treat color as a combination of three primary colors, red, green and blue (RGB). Red, green and blue are called additive primary colors because adding various amounts of each color produces a single perceived color in the visible spectrum. Another traditional color specification method, popular in the publishing industry for mixing inks, is based on combining the subtractive primaries, cyan, yellow, magenta and black (CYMK). Television broadcast represents color with yet another method in which RGB signals are encoded into luminance (Y) and chrominance (I and Q) signals to facilitate broadcasting. Three common amplitude domains exist for color measurements. RGB is a "tri-mono" representation where luminance and color information are encoded among the red, green and blue and components. YPrPb is a rectangular color representation wherein color is represented in cartesian coordinates and augmented with an independent luminance (Y) signal. Finally, hue-saturation-value (HSV) is a polar color representation wherein color is represented in polar coordinates, and saturation represents the distance, r, from the origin, and hue, the angle. This color information is augmented with an independent luminance value (V).
Color image processing can be much less complicated and quicker to execute if color images captured from RGB video sources can be digitally converted from RGB data to hue-saturation-intensity (HSI) data.
In addition to facilitating straightforward computer processing, thinking about and specifying color in terms of HSI values may closely approximate the way humans perceive and interpret color. Hue, for example, is a color attribute that describes a pure color, such as pure red, pure yellow, pure green, pure blue, pure purple, or some intermediate between these. Hue is what we are typically referring to when we use the term "color." Saturation is another color attribute that describes the degree to which a pure color is diluted with white. A highly saturated color has a low white content. Intensity is a color-neutral attribute that describes the relative brightness or darkness. The intensity of a color image corresponds to the gray-level (black and white) version of the image.
FIG. 1 illustrates an equilateral triangular color map having the three primary colors RBG at its three vertices. The equilateral triangle maps out the large range of reproducible colors in the visual spectrum and is useful in understanding color. This equilateral triangle is used to map RGB chromaticity coordinates. Pure hues can be selected by moving around the perimeter. Saturation can be decreased by moving toward white, while intensity can be varied by moving perpendicularly through white on a third axis.
Unlike color images represented in RGB color space, images composed of hue, saturation and intensity values can be analyzed simply because the HSI values themselves can be processed individually and independently. Convolution, for example, can be performed on a color image using just the intensity component of an HSI color image. A histogram can be generated based solely on hue data in order to learn about the frequency distribution of hues. Performing similar operations on RGB images is more complicated, requiring at least three times as many computations, since RGB values must all be manipulated.
Color image processing has seen somewhat limited application thus far because of the drawbacks of working with images stored in the traditional red, green and blue format. Although most video cameras and display monitors capture and display signals in the RGB domain, and graphics systems generate images by combining RGB values, capturing and processing images made up of RGB data is highly inefficient. In a computer system (or frame grabber), separate frame buffers-hold the red, green and blue data comprising the color image. The three buffers must be looked at together to be analyzed or processed. Inefficient color processing results because, in effect, operations must be performed three times.
Hue-saturation-intensity color space is amenable to more efficient processing because the HSI frame buffers comprising the color image are relatively uncorrelated with one another. These buffers individually provide useful information when interpreting a color scene.
Mathematically, it is relatively easy to change a color or an entire color image from the RGB color space to the HSI color space. If the RGB coordinates are thought of as being produced by an RGB camera, then the intensity of any color at that point will be given by: ##EQU1##
Further, the hue of the color can be represented as the angle resulting from a vector rotating about the white point (R=G=B point). A hue angle of zero degrees corresponds to any point on the line drawn from the white point at the triangle's center to the red vertex; thus hue can be given by: ##EQU2## Saturation can be obtained by: ##EQU3##
In Equation 4, the lowest value of either R/I, G/I, or B/I is subtracted from 1 to give the saturation. Thus for a color with zero saturation (white), R/I=G/I=B/I=1. The value of saturation is 0.
Hardware has been developed to address the RGB to HSI conversions. Data Translation (Marlboro, Mass.) has developed two 15-MHz CMOS ICs for performing RGB-to-HSI and HSI-to-RGB color space transformations. Designed for use in color frame-grabber boards from DT, these converter chips can transform 512.times.512 pixel color images in real time. The RGB/HSI converter receives 8-bit hue, 8-bit saturation and 8-bit intensity values for storage and processing. The HSI/RGB converter transforms the HSI data back to RGB pixel values after processing for display.